package com.ddyx.mapper;

import com.ddyx.entity.Deal;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

@MyBatisRepository
public interface DealMapper {
    int deleteByPrimaryKey(Integer dealId);

    int insert(Deal deal);

    Deal selectByPrimaryKey(Integer dealId);

    List<Deal> selectAll();

    int updateByPrimaryKey(Deal record);
    
	List<Map<String,Object>> findByCustomerId(@Param("start")int start
			,@Param("size")int size
			,@Param("customerId")int customerId);
	int countByCustomerId(@Param("customerId")int customerId);
	
	Deal selectDealByMasterId(@Param("billNo")String billNo,@Param("customerId")int customerId, @Param("storeId")int storeId);
	
	int updateStatus(@Param("billNo")String billNo);
}